<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>新闻详细</title>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script src="../js/topfoot.js"></script>
    <link rel="stylesheet" href="../css/titlebanner.css">
</head>
<style>
    .newstitle {
        color: orange;
        border: 1px solid gray;
        line-height: 50px;
        font-size: 30px;
        margin-top: 20px;
        text-indent: 10px;
    }

    .newscontent {
        border: 1px solid gray;
        line-height: 30px;
        text-indent: 2em;
        padding: 10px;
        margin-bottom: 20px;
    }
</style>
<script>
    $(function () {
        let id = sessionStorage.getItem("newsDetailId");
        if (id != null) {
            let data = myAjax("newsDetail", {id: id}, "get");
            getNewsDetail(data);
            localStorage.setItem("key","value");
            localStorage.getItem("key");
            sessionStorage.setItem("newsDetailId", null);
        }

    });

    function getNewsDetail(data) {
        $("#news-detail-title").html(data[0].title);
        $("#news-detail-content").html(data[0].content);
    }
</script>
<body>
<div id="tophtml"></div>
<div class="content">
    <div class="title-banner newstitle">
        <div id="news-detail-title">新闻动态</div>
        <div></div>
    </div>
    <div class="newscontent" id="news-detail-content">

    </div>
</div>
<div id="foothtml"></div>
</body>
</html>